package biz.datalk.industrialland.common.shiro;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.springframework.boot.context.properties.ConfigurationProperties;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * @author tarofang@163.com
 * @date 2020-08-20
 */
@Getter
@Setter
@ToString
@ConfigurationProperties(ShiroFilterChainProperties.PREFIX)
public class ShiroFilterChainProperties implements Serializable {
    private static final long serialVersionUID = 1L;

    public static final String PREFIX = "datalk.shirofilterchain";

    /** 是否启用 */
    private boolean enable = true;

    /** 过滤连 */
    private List<Chain> chains;

    @Getter
    @Setter
    @ToString
    public static class Chain implements Serializable {
        private static final long serialVersionUID = 1L;

        /** 过滤器名称 */
        private String filterName;
        /** 过滤器 class */
        private String filterClass;
        /** 过滤的路径 */
        private ArrayList<String> patterns;

    }


}
